﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Omes.Services;

namespace Omes.Admin.ContentManage
{
    public partial class MenuAdd : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Omes.Services.DbServer db = new DbServer();
                menutype.DataSource = db.GetAllPageTypes();
                menutype.DataTextField = "PageTypeName";
                menutype.DataValueField = "Id";
                menutype.DataBind();
            }

        }

        protected void parentpage_Init(object sender, EventArgs e)
        {
            Omes.Services.DbServer db = new DbServer();
            parentpage.DataSource = db.GetParentPages();
            parentpage.DataTextField = "PageName";
            parentpage.DataValueField = "Id";
            parentpage.DataBind();
        }
    }
}